3.1.83 \(\int x (a+b x) (A+B x) \, dx\) [83]

Optimal. Leaf size=33 \[ \frac {1}{2} a A x^2+\frac {1}{3} (A b+a B) x^3+\frac {1}{4} b B x^4 \]

[Out]

1/2*a*A*x^2+1/3*(A*b+B*a)*x^3+1/4*b*B*x^4

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {77} \begin {gather*} \frac {1}{3} x^3 (a B+A b)+\frac {1}{2} a A x^2+\frac {1}{4} b B x^4 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*(a + b*x)*(A + B*x),x]

[Out]

(a*A*x^2)/2 + ((A*b + a*B)*x^3)/3 + (b*B*x^4)/4

Rule 77

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && (NeQ[n, -1] || EqQ[p, 1]) && N
eQ[b*e + a*f, 0] && ( !IntegerQ[n] || LtQ[9*p + 5*n, 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && Rational
Q[a, b, d, e, f])) && (NeQ[n + p + 3, 0] || EqQ[p, 1])

Rubi steps

\begin {align*} \int x (a+b x) (A+B x) \, dx &=\int \left (a A x+(A b+a B) x^2+b B x^3\right ) \, dx\\ &=\frac {1}{2} a A x^2+\frac {1}{3} (A b+a B) x^3+\frac {1}{4} b B x^4\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 29, normalized size = 0.88 \begin {gather*} \frac {1}{12} x^2 (b x (4 A+3 B x)+a (6 A+4 B x)) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*x)*(A + B*x),x]

[Out]

(x^2*(b*x*(4*A + 3*B*x) + a*(6*A + 4*B*x)))/12

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 28, normalized size = 0.85

method result size
default \(\frac {a A \,x^{2}}{2}+\frac {\left (A b +B a \right ) x^{3}}{3}+\frac {b B \,x^{4}}{4}\) \(28\)
norman \(\frac {b B \,x^{4}}{4}+\left (\frac {A b}{3}+\frac {B a}{3}\right ) x^{3}+\frac {a A \,x^{2}}{2}\) \(29\)
gosper \(\frac {1}{4} b B \,x^{4}+\frac {1}{3} x^{3} A b +\frac {1}{3} x^{3} B a +\frac {1}{2} a A \,x^{2}\) \(30\)
risch \(\frac {1}{4} b B \,x^{4}+\frac {1}{3} x^{3} A b +\frac {1}{3} x^{3} B a +\frac {1}{2} a A \,x^{2}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(b*x+a)*(B*x+A),x,method=_RETURNVERBOSE)

[Out]

1/2*a*A*x^2+1/3*(A*b+B*a)*x^3+1/4*b*B*x^4

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 27, normalized size = 0.82 \begin {gather*} \frac {1}{4} \, B b x^{4} + \frac {1}{2} \, A a x^{2} + \frac {1}{3} \, {\left (B a + A b\right )} x^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)*(B*x+A),x, algorithm="maxima")

[Out]

1/4*B*b*x^4 + 1/2*A*a*x^2 + 1/3*(B*a + A*b)*x^3

________________________________________________________________________________________

Fricas [A]
time = 0.95, size = 29, normalized size = 0.88 \begin {gather*} \frac {1}{4} x^{4} b B + \frac {1}{3} x^{3} a B + \frac {1}{3} x^{3} b A + \frac {1}{2} x^{2} a A \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)*(B*x+A),x, algorithm="fricas")

[Out]

1/4*x^4*b*B + 1/3*x^3*a*B + 1/3*x^3*b*A + 1/2*x^2*a*A

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 29, normalized size = 0.88 \begin {gather*} \frac {A a x^{2}}{2} + \frac {B b x^{4}}{4} + x^{3} \left (\frac {A b}{3} + \frac {B a}{3}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)*(B*x+A),x)

[Out]

A*a*x**2/2 + B*b*x**4/4 + x**3*(A*b/3 + B*a/3)

________________________________________________________________________________________

Giac [A]
time = 1.19, size = 29, normalized size = 0.88 \begin {gather*} \frac {1}{4} \, B b x^{4} + \frac {1}{3} \, B a x^{3} + \frac {1}{3} \, A b x^{3} + \frac {1}{2} \, A a x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(b*x+a)*(B*x+A),x, algorithm="giac")

[Out]

1/4*B*b*x^4 + 1/3*B*a*x^3 + 1/3*A*b*x^3 + 1/2*A*a*x^2

________________________________________________________________________________________

Mupad [B]
time = 0.04, size = 28, normalized size = 0.85 \begin {gather*} \frac {B\,b\,x^4}{4}+\left (\frac {A\,b}{3}+\frac {B\,a}{3}\right )\,x^3+\frac {A\,a\,x^2}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(A + B*x)*(a + b*x),x)

[Out]

x^3*((A*b)/3 + (B*a)/3) + (A*a*x^2)/2 + (B*b*x^4)/4

________________________________________________________________________________________